﻿using System.Collections.Concurrent;

namespace NetMicro.Cache.DelayBus
{
    /// <summary>
    /// 延迟队列topic
    /// </summary>
    public static class DelayTopic
    {
        /// <summary>
        /// 延迟队列Topic
        /// </summary>
        private static readonly ConcurrentBag<string> DelayTopics = new ConcurrentBag<string>();

        /// <summary>
        /// 获取redis topic
        /// </summary>
        /// <returns></returns>
        public static ConcurrentBag<string> Get()
        {
            return DelayTopics;
        }

        /// <summary>
        /// 添加redis topic
        /// </summary>
        /// <returns></returns>
        public static void Add(string topic)
        {
            DelayTopics.Add(topic);
        }
    }
}
